import request from '@/utils/request.js'

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    url: '/api/employee/page',
    method: 'get',
    params
  })
}

// 新增员工
export function addEmployee(data) {
  return request({
    url: '/api/employee',
    method: 'post',
    data
  })
}

// 更新员工
export function updateEmployee(data) {
  return request({
    url: '/api/employee',
    method: 'put',
    data
  })
}

// 删除员工
export function deleteEmployee(id) {
  return request({
    url: `/api/employee/${id}`,
    method: 'delete'
  })
}

// 更新员工状态
export function updateEmployeeStatus(id, status) {
  return request({
    url: `/api/employee/status/${id}/${status}`,
    method: 'put'
  })
}
